using System;
using System.Collections.Generic;
using System.Text;
using DDW.Collections;

namespace DDW
{
	public class AccessorNode : MemberNode
	{
		private string kind;

		public string Kind
		{
			get { return kind; }
			set { kind = value; }
		}
		private bool isAbstractOrInterface = false;
		public bool IsAbstractOrInterface
		{
			get { return isAbstractOrInterface; }
			set { isAbstractOrInterface = value; }
		}

		private BlockStatement statementBlock = new BlockStatement();
		public BlockStatement StatementBlock
		{
			get { return statementBlock; }
			set { statementBlock = value; }
		}

        public override void ToSource(StringBuilder sb)
		{
			if (attributes != null)
			{
				attributes.ToSource(sb);
				this.NewLine(sb);
			}
			sb.Append(Kind);
			if (IsAbstractOrInterface)
			{
				sb.Append(";");
			}
			else
			{
				this.NewLine(sb);
				// statements
				this.StatementBlock.ToSource(sb);
			}
        }
	
	}
}
